package com.zw.yzk.kabu.domain.interactor;

import com.zw.yzk.kabu.domain.executor.ExecutionThread;
import com.zw.yzk.kabu.domain.executor.ThreadExecutor;
import com.zw.yzk.kabu.domain.repository.Repository;
import com.zw.yzk.kabu.domain.repository.UseCase;

import javax.inject.Inject;

import rx.Observable;


/**
 * Created by wei on 2016/12/22.
 */
public class DefaultUseCase extends UseCase {

    private Repository login;

    @Inject
    public DefaultUseCase(ExecutionThread thread, ThreadExecutor executor, Repository repository) {
        super(thread, executor);
        this.login = repository;
    }

    @Override
    public <T> Observable buildObservable(T t) {
        return login.observe(t);
    }
}
